package com.qf.controller;

import com.alibaba.excel.EasyExcel;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qf.entity.Sheet;
import com.qf.service.SheetService;
import com.sun.deploy.net.URLEncoder;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import com.qf.util.R;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * 患者问诊信息表(Sheet)表控制层
 *
 * @author makejava
 * @since 2024-12-06 19:45:07
 */
@RestController
@RequestMapping("/md/patSheet")
public class SheetController {
    /**
     * 服务对象
     */
    @Autowired
    private SheetService sheetService;

    /**
     * 查询所有患者问诊信息表(Sheet)
     *
     * @return 所有患者问诊信息表(Sheet)
     */
    @GetMapping("/case")
    public R sheetList(Sheet sheet) {

      PageHelper.startPage(sheet.getPageNum(), sheet.getPageSize());

    List<Sheet> list = sheetService.list(sheet);

    PageInfo<Sheet> pageInfo = new PageInfo<>(list);

            return R.ok(pageInfo);

    }
}


